package com.example.design_pattern.observer;

/**
 * Created by SQ_BXZ on 2019-02-16.
 *  使用自己编写的订阅/发布
 */
public class Test {
    public static void main(String[] args) {
        WeatherData weatherData= new WeatherData();
        CurrentConditionsDisplay display = new CurrentConditionsDisplay(weatherData);
//        StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
//        ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
//        HeatIndexDisplay heatIndexDisplay = new HeatIndexDisplay(weatherData);
        weatherData.setMeasurements(80, 65, 30.4f);
        weatherData.setMeasurements(82, 70, 29.2f);
        weatherData.setMeasurements(78, 90, 29.2f);
    }
}
